{extend name='admin@main'}

{block name="content"}

{include file='store@goods/form_style'}
<style type="text/css">
  .layui-disabled, .layui-disabled:hover {
    color: #666 !important;
    cursor: not-allowed !important;
}
.layui-radio-disbaled > i {
    color: #5FB878 !important;
}
</style>
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body think-box-shadow padding-left-40">
  <div class="layui-form-item">
    <label class="layui-form-label">兼职标题</label>
    <div class="layui-input-block">
      <input name="title" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} lay-verify="title" value="{$result.title}" autocomplete="off" placeholder="请输入标题" class="layui-input" type="text">
    </div>
  </div>
    <div class="layui-form-item ">
      
      <div class="layui-inline">
        <label class="layui-form-label">兼职类型</label>
        <div class="layui-input-inline">
          <select class="layui-select" {eq name='result.admin_id' value='0'}disabled="disabled" {/eq} name="work_type" lay-search>
              {foreach $jobtype as $jobtype}
              {if  $result.work_type eq $jobtype.id}
              <option selected value="{$jobtype.id}">{$jobtype.name}</option>
              {else}
              <option value="{$jobtype.id}">{$jobtype.name}</option>
              {/if}
            {/foreach}
            </select>
        </div>
      </div>

      <div class="layui-inline">
        <label class="layui-form-label">薪资待遇</label>
        <div class="layui-input-inline">
          <input name="salary" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.salary}" lay-verify="salary"  autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">薪资单位</label>
        <div class="layui-input-inline">
            <select class="layui-select" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} name="salary_unit" lay-search>
              {foreach $salary_unit as $salary_unit}
                {if  $result.salary_unit eq $salary_unit.index}
                <option selected value="{$salary_unit.index}">{$salary_unit.text}</option>
                {else}
                <option value="{$salary_unit.index}">{$salary_unit.text}</option>
                {/if}
              {/foreach}
            </select>
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">所需人数</label>
        <div class="layui-input-inline">
          <input name="need_worker" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.need_worker}" lay-verify="need_worker" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-inline">
          <input name="contacts" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.contacts}" lay-verify="contacts" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      
    </div>

    <div class="layui-form-item ">
      <div class="layui-inline">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-inline">
          <input name="mobile" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.mobile}" lay-verify="mobile" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">工作地区</label>
        <div class="layui-input-inline">
          <input name="provinces_name" disabled="disabled" value="{$result.provinces_name}" lay-verify="provinces_name" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">详细地址</label>
        <div class="layui-input-inline">
          <input name="address" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.address}" lay-verify="address" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">兼职时间</label>
        <div class="layui-input-inline">
          <input name="work_time" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.work_time} - {$result.work_time_end}" id="test1" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">上班时间</label>
        <div class="layui-input-inline">
          <input name="work_up_time" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.work_up_time}" id="" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <!-- <div class="layui-inline">
        <label class="layui-form-label">浏览量</label>
        <div class="layui-input-inline">
          <input name="click_num" disabled="disabled" value="{$result.click_num}" lay-verify="click_num" autocomplete="off" class="layui-input" type="text">
        </div>
      </div> -->
    </div>
    <div class="layui-form-item ">
      <!-- <div class="layui-inline">
        <label class="layui-form-label">分享次数</label>
        <div class="layui-input-inline">
          <input name="share_num" disabled="disabled" value="{$result.share_num}" lay-verify="share_num" autocomplete="off" class="layui-input" type="text">
        </div>
      </div> -->
      <div class="layui-inline">
        <label class="layui-form-label">下班时间</label>
        <div class="layui-input-inline">
          <input name="work_down_time" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="{$result.work_down_time}"  autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">发布时间</label>
        <div class="layui-input-inline">
          <input name="created_at" disabled="disabled" value="{$result.created_at}" disabled="disabled" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
     
      <div class="layui-inline">
        <label class="layui-form-label">兼职状态</label>
        <div class="layui-input-inline">
           <select class="layui-select" disabled="disabled"  name="status" lay-search>
              {foreach $jobstatus as $jobstatus}
                {if  $result.status eq $jobstatus.index}
                <option selected value="{$jobstatus.index}">{$jobstatus.text}</option>
                {else}
                <option value="{$jobstatus.index}">{$jobstatus.text}</option>
                {/if}
              {/foreach}
            </select>
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">报名人数</label>
        <div class="layui-input-inline">
          <input name="had_worker" disabled="disabled" value="{$result.had_worker}" id="test1" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">结算方式</label>
        <div class="layui-input-inline">
          <select class="layui-select" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq}  name="settlement_type" lay-search>
            {foreach $settlement as $settlement}
              {if  $result.settlement_type eq $settlement.index}
              <option selected value="{$settlement.index}">{$settlement.text}</option>
              {else}
              <option value="{$settlement.index}">{$settlement.text}</option>
              {/if}
            {/foreach}
          </select>
        </div>
      </div>

    </div>

    <div class="layui-form-item ">

     <div class="layui-inline">
        <label class="layui-form-label">收藏次数</label>
        <div class="layui-input-inline">
          <input name="share_num" disabled="disabled" value="{$result.share_num}" lay-verify="share_num" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      
      <div class="layui-inline">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
          <label><input name="gender" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="1" title="男" {eq name='$result.gender' value='1'} checked {/eq} type="radio"></label>
          <label><input name="gender" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="2" title="女" {eq name='$result.gender' value='2'} checked {/eq} type="radio"></label>
          <label><input name="gender" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="0" title="不限" {eq name='$result.gender' value='0'} checked {/eq} type="radio"></label>
        </div>
      </div>
      
      <div class="layui-inline">
        <label class="layui-form-label">是否置顶</label>
        <div class="layui-input-block">
          <label><input name="is_top"  {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="1" title="是" {eq name='$result.is_top' value='1'} checked {/eq} type="radio"></label>
          <label><input name="is_top" {eq name='result.admin_id' value='0'} disabled="disabled" {/eq} value="0" title="否" {eq name='$result.is_top' value='0'} checked {/eq} type="radio"></label>
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">是否推荐</label>
        <div class="layui-input-block">
          <label><input name="is_recommend" {eq name='result.admin_id' value='0'}  disabled="disabled" {/eq} value="1" title="是" {eq name='$result.is_recommend' value='1'} checked {/eq} type="radio"></label>
          <label><input name="is_recommend" {eq name='result.admin_id' value='0'}  disabled="disabled" {/eq} value="0" title="否" {eq name='$result.is_recommend' value='0'} checked {/eq} type="radio"></label>
        </div>
      </div>
     <!--  <div class="layui-inline">
        <label class="layui-form-label">是否删除</label>
        <div class="layui-input-block">
          <label><input name="is_deleted" disabled="disabled" value="1" title="是" {eq name='$result.is_deleted' value='1'} checked {/eq} type="radio"></label>
          <label><input name="is_deleted" disabled="disabled" value="0" title="否" {eq name='$result.is_deleted' value='0'} checked {/eq} type="radio"></label>
        </div>
      </div> -->
      
      
    </div>

    <div class="layui-form-item ">
      <div class="layui-inline">
            <label class="layui-form-label">兼职内容</label>
            <textarea rows="8" cols="150" name="content" >{$result.extendContent.content}</textarea>
      </div>
    </div>
    <div class="layui-form-item ">
      <div class="layui-inline">
            <label class="layui-form-label">工作要求</label>
            <textarea rows="8" cols="150" name="requirement" >{$result.extendContent.requirement}</textarea>
      </div>
    </div>
    <div class="layui-form-item ">
      <div class="layui-inline">
            <label class="layui-form-label">兼职福利</label>
            <textarea rows="8" cols="150" name="work_welfare" >{$result.extendContent.work_welfare}</textarea>
      </div>
    </div>
    <div class="layui-form-item ">
      <input type="hidden" name="job_id" value="{$result.id}">
      {if agent_auth("auditJob")}
      {eq name='$result.status' value='1'}
       <a class="layui-btn layui-btn-sm layui-btn-normal" data-action="{:url('auditJob')}" data-value="id#{$result.id};status#1">审核通过</a>

       <a data-title="审核拒绝" class="layui-btn layui-btn-sm" data-modal='{:url("deny")}?id={$result.id}'>审核拒绝</a>
      
       <button class="layui-btn layui-btn-warm" type="submit" style="margin-left: 20px;">保存</button>
      {/eq}
      {neq name='$result.admin_id' value='0'}
      <input type="hidden" name="admin_id" value="{$result.admin_id}">
      <button class="layui-btn layui-btn-warm" type="submit" style="margin-left: 20px;">保存</button>
      {/neq}
      {/if}

    </div>
</div>
</form>
{/block}

{block name='script'}

<script>
  window.form.render();
  layui.use('laydate', function(){
    var laydate = layui.laydate;
    //常规用法
    laydate.render({
      elem: '#test1'
      ,range: true
    });
    laydate.render({
      elem: '#test2'
    });
    
  });

 /* require(['ckeditor', 'angular'], function () {
     window.createEditor('[name="content"]', {height: 200});
     window.createEditor('[name="requirement"]', {height: 200});
     window.createEditor('[name="work_welfare"]', {height: 200});
   });*/
</script>

{/block}